/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏样式 */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 60px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-icon {
    font-size: 24px;
    color: #ff6b6b;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.app-title {
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-right {
    display: flex;
    gap: 12px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 欢迎页面样式 */
.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    width: 100%;
}

.welcome-icon {
    font-size: 64px;
    color: #667eea;
    margin-bottom: 24px;
}

.welcome-card h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
}

.welcome-card p {
    font-size: 16px;
    color: #718096;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* 按钮样式 */
.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #4a5568;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.secondary-btn:hover {
    background: white;
    transform: translateY(-1px);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.success-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(72, 187, 120, 0.4);
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 进度条样式 */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.progress-step.active:not(:last-child)::after {
    background: #667eea;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #667eea;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    text-align: center;
}

.progress-step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

/* 创建内容样式 */
.creation-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

.step-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

/* 网格布局 */
.effects-grid,
.oils-grid,
.containers-grid,
.packaging-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.effect-card,
.oil-card,
.container-card,
.package-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.effect-card:hover,
.oil-card:hover,
.container-card:hover,
.package-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.effect-card.selected,
.oil-card.selected,
.container-card.selected,
.package-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #667eea;
}

.selected .card-icon {
    color: white;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-description {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
}

.selected .card-description {
    color: rgba(255, 255, 255, 0.9);
}

.card-price {
    font-size: 14px;
    font-weight: 600;
    color: #48bb78;
    margin-top: 8px;
}

.selected .card-price {
    color: #90cdf4;
}

/* 蜡材选项样式 */
.wax-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wax-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wax-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.wax-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 数量选择器 */
.quantity-selector {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4a5568;
}

.quantity-selector input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.quantity-selector input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 成本核算样式 */
.cost-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.cost-breakdown {
    background: #f7fafc;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cost-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 18px;
    color: #2d3748;
}

.pricing-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.total-cost {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    text-align: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.pricing-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pricing-input label {
    font-weight: 600;
    color: #4a5568;
}

.pricing-input input {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
}

.profit-margin {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 12px;
}

/* 步骤导航 */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 库存管理样式 */
.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.inventory-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 24px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 32px;
    color: #667eea;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.inventory-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #4a5568;
}

.modal-body {
    padding: 0 24px 24px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-content {
        padding: 0 16px;
    }
    
    .app-title {
        font-size: 18px;
    }
    
    .nav-right {
        gap: 8px;
    }
    
    .nav-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .welcome-card {
        padding: 40px 24px;
    }
    
    .progress-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .progress-step {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .progress-step:not(:last-child)::after {
        display: none;
    }
    
    .creation-content {
        padding: 24px;
    }
    
    .cost-summary {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .effects-grid,
    .oils-grid,
    .containers-grid,
    .packaging-grid {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content.active {
    animation: fadeIn 0.5s ease;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}